package com.xinghai.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinghai.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import com.xinghai.common.core.domain.BaseEntity;

/**
 * 订单模块对象 qd_order
 *
 * @author xinghai
 * @date 2024-12-04
 */
@TableName("qd_order")
@Data
public class QdOrder extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 状态 */

    @Excel(name = "状态",readConverterExp = "0=正常,1=封单,2=冻结,3=拆单,4=合单")
    private String status;

    /** 删除标志 */
    private String delFlag;

    /** 订单号 */

    @Excel(name = "订单号")
    private String orderNo;

    /** 卖家用户id */

    //@Excel(name = "卖家用户id")
    private Long sellerUserId;

    /** 卖家用户名称 */

    @Excel(name = "卖家用户名称")
    private String sellerUserName;

    /** 卖家用户手机号 */

    @Excel(name = "卖家用户手机号")
    private String sellerUserPhone;

    /** 卖家确认平账 */

    //@Excel(name = "卖家确认平账")
    private String sellerBalance;

    /** 买家用户id */

    //@Excel(name = "买家用户id")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long buyerUserId;

    /** 买家用户名称 */

    @Excel(name = "买家用户名称")
    private String buyerUserName;

    /** 买家用户手机号 */

    @Excel(name = "买家用户手机号")
    private String buyerUserPhone;

    /** 买家确认平账 */

    //@Excel(name = "买家确认平账")
    private String buyerBalance;

    /** 购买类型 1预约单 2抢购单 3指派单 4其他*/
    @Excel(name = "购买类型",readConverterExp = "0=未出售,1=预约单,2=抢购单,3=指派单,4=其他")
    private String buyerType;

    /** 卖家买入价 */
    @Excel(name = "卖家买入价")
    private BigDecimal oldPrice;

    /** 卖家卖出价/买家买入价 */

    @Excel(name = "卖家卖出价/买家买入价")
    private BigDecimal price;

    /** 买家卖出价 */

    @Excel(name = "买家卖出价")
    private BigDecimal newPrice;

    /** 上架费 */
    @Excel(name = "上架费")
    private BigDecimal listingFee;

    /** 直推佣金 */
    @Excel(name = "直推佣金")
    private BigDecimal pushAmount;

    /** 卖出状态（0待出售，1待收款，2已完成） */

    @Excel(name = "卖出状态", readConverterExp = "0=待出售，1待收款，2已完成")
    private String sellerStatus;

    /** 买入状态（0待支付，1待对账，2待上架，3待审核，4已上架） */

    @Excel(name = "买入状态", readConverterExp = "0=待支付，1待对账，2待上架，3待审核，4已上架")
    private String buyerStatus;

    @TableField(exist = false)
    private String buyerStatusStr;

    /** 商品图片 */

    //@Excel(name = "商品图片")
    private String goodImg;

    /** 商品id */

    //@Excel(name = "商品id")
    private Long goodId;

    //@Excel(name = "店铺id")
    private Long storeId;
    /** 商品名称 */

    @Excel(name = "商品名称")
    private String goodName;

    @TableField(exist = false)
    private Long userId;

    @TableField(exist = false)
    private BigDecimal minPrice;

    @TableField(exist = false)
    private BigDecimal maxPrice;

    @TableField(exist = false)
    private BigDecimal orderAmount;

    @TableField(exist = false)
    private Integer orderNum;

    @TableField(exist = false)
    private boolean buyerFlag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date dealTime;

}
